package com.study.design.builder.bike;

import com.study.design.builder.bike.bus.CarbonFrame;
import com.study.design.builder.bike.bus.InflateTire;
import com.study.design.builder.bike.bus.RubberSeat;

/**
 * @Author 网易云课堂微专业-java高级开发工程师【allen老师】
 * @Version 1.0
 */
public class OfoBuilder extends Builder{
    private Bike mBike = new Bike();
    @Override
    void buildFrame() {
        mBike.setFrame(new CarbonFrame());  // 碳纤维框架
    }
    @Override
    void buildSeat() {
        mBike.setSeat(new RubberSeat());    // 橡胶座
    }
    @Override
    void buildTire() {
        mBike.setTire(new InflateTire());   // 充气轮胎
    }
    @Override
    Bike createBike() {
        return mBike;
    }
}
